package fi.foyt.cs.persistence.domainmodel.oauth;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Key;

@Entity
@Cacheable
public class AuthenticatedUser {

  public Key getId() {
    return id;
  }
  
  public String getUserId() {
    return userId;
  }
  
  public void setUserId(String userId) {
    this.userId = userId;
  }
  
  public String getGrantedScopes() {
    return grantedScopes;
  }
  
  public void setGrantedScopes(String grantedScopes) {
    this.grantedScopes = grantedScopes;
  }
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Key id;

  @Column (nullable = false)
  private String userId;
  
  @Column (nullable = false)
  private String grantedScopes;
}